<div id ="courselist">Please select your course from the available list:</div>
<?php $this->dojo()->enable();?>
<?php 
$this->accordionContainer()->captureStart(
 'courses',
  array('duration' => 200),
  array('style' => 'width: 400px; height: 400px;')
  );
  foreach ($this->paginator as $course) {
  	$rate =   $this->url(array('module'=>'community', 'controller'=> 'ratecourse', 'action'=>'getperiod', 'type' =>'rate', 'id' =>$course['id'], 'no'=>$course['course_no'], 'school'=>$course['school_id'], 'dept'=>$course['dept_id']));
  	$viewcomments =  $this->url(array('module'=>'community', 'controller'=> 'ratecourse', 'action'=>'getperiod', 'type' =>'viewcomments', 'id' =>$course['id'],'no'=>$course['course_no'], 'school'=>$course['school_id'], 'dept'=>$course['dept_id']));
  	$viewrating =   $this->url(array('module'=>'community', 'controller'=> 'ratecourse', 'action'=>'getperiod', 'type' => 'viewavg', 'id' =>$course['id'],'no'=>$course['course_no'], 'school'=>$course['school_id'], 'dept'=>$course['dept_id']));
  	$viewDiffDistr = $this->url(array('module'=>'community', 'controller'=> 'ratecourse', 'action'=>'getperiod', 'type' => 'diff', 'id' =>$course['id'],'no'=>$course['course_no'], 'school'=>$course['school_id'], 'dept'=>$course['dept_id']));
  	$viewInsDistr = $this->url(array('module'=>'community', 'controller'=> 'ratecourse', 'action'=>'getperiod', 'type' => 'instr', 'id' =>$course['id'],'no'=>$course['course_no'], 'school'=>$course['school_id'], 'dept'=>$course['dept_id']));
  	$viewTimeDistr = $this->url(array('module'=>'community', 'controller'=> 'ratecourse', 'action'=>'getperiod', 'type' => 'time', 'id' =>$course['id'],'no'=>$course['course_no'], 'school'=>$course['school_id'], 'dept'=>$course['dept_id']));
  	$viewGradeDistr = $this->url(array('module'=>'community', 'controller'=> 'ratecourse', 'action'=>'getperiod', 'type' => 'grade', 'id' =>$course['id'],'no'=>$course['course_no'], 'school'=>$course['school_id'], 'dept'=>$course['dept_id']));
  	$viewTextDistr = $this->url(array('module'=>'community', 'controller'=> 'ratecourse', 'action'=>'getperiod', 'type' => 'text', 'id' =>$course['id'],'no'=>$course['course_no'], 'school'=>$course['school_id'], 'dept'=>$course['dept_id']));
  	
  	
  	$Content = "<br><a href = $rate> Rate Course</a>"
  			   ." <br><a href = $viewcomments>View Comments on course</a>"
  			   . " <br><a href = $viewrating>View Average User ratings </a>"
  			   ."<br><strong>Rating distribution among respondents</strong>"
  			   . " <br><a href = $viewDiffDistr>Difficulty rating distribution </a>"
  			   . " <br><a href = $viewInsDistr>Instructor distribution </a>"
  			   . " <br><a href = $viewTimeDistr>Time rating distribution </a>"
  			   . " <br><a href = $viewGradeDistr>Grade distribution </a>"
  			   . " <br><a href = $viewTextDistr>Textbook rating distribution </a></ul>";
  			   
  			   
  	
  	
  echo $this->accordionPane(
  'courses' .$course['id'],
  	$Content,
   array ('title' => $course['course_no'] . " -- " .$course['name']),
  array ("style" => 'background-color: white;'),
  array ('design' => 'news;')
  );
  }
  echo $this->accordionContainer()->captureEnd('courses');
  
  ?>

<?php echo $this->paginationControl($this->paginatior, 'Sliding', 'pagination.phtml' ); ?>
